package org.example;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestControll {
    @Autowired
    private DeptService deptService;
    @GetMapping(value="/business/test/{value}")

    public String businessMethod(@PathVariable("value") String value)
    {
        Dept dept = new Dept();
        dept.setId(1);;
        dept.setDeptName(value);
        deptService.updateDept(dept);
        return "say:"+value;
    }
}
